import { Request, toast, parseTime } from '../../../utils/util.js'
let request = new Request()
const app = getApp()
Page({

  data: {
    orderList : []
  },

  onLoad: function (options) {
    request.post('testcharge/getOrderList', res => {
      if(res.success) {
        let orderList = res.data.list
        if (orderList.lenght > 0) {
          orderList.forEach(order => {
            order.start_time = parseTime(order.start_time)
          })
          this.setData({ orderList: orderList })
        }
        
      }
    })
  }
})